<?php
declare (strict_types = 1);

namespace app\validate\common\trtc;

use app\model\communal\CounselorCrowdModel;
use think\Validate;

class TrtcValidate extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'room_id' => ['require'],
        'user_ids' => ['require', 'max:100'],
        'expert_id' => ['require', 'number', 'gt:0'],
        'user_id' => ['require', 'number', 'gt:0'],
    ];

    protected $field = [
        'room_id' => '房间号',
        'user_ids' => '用户列表',
        'user_id' => '用户',
        'expert_id' => '专家',
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [];

    /**
     * 场景
     * @var array
     */
    protected $scene = [
        'rur' => ['room_id', 'user_ids'],
        'drr' => ['room_id'],
        'user' => ['user_id'],
        'expert' => ['expert_id'],
    ];
}
